<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Vue实例中的data</title>
</head>
<body>
    <h1>Vue实例中的data</h1>
    <div style="color:gray">
        <p>验证Vue里的数据是响应式的。</p>
        <pre>data.a = 2
data === app.$data
data.a === app.a
app.$el === document.getElementById('app')
        </pre>
    </div>
    <div>
        <a href="/">回目录</a>
    </div>
    <hr>
    <div id="app">
        {{ a }}
    </div>
    <script src="/node_modules/vue/dist/vue.js"></script>
    <script>
        var data = { a : 1 };

        var app = new Vue({
            el: "#app",
            data: data
        });
    </script>    
</body>
</html>